package lab02.test35;

public class Salesman extends Employee {
    int bonus;  //表示销售人员的提成

    @Override
    void setInformation(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    void getInformation() {
        System.out.println("销售人员的基本信息:" + "姓名" + name + " 年龄" + age);

    }

    @Override
    void setSalary(int salary) {
        this.salary = salary;
    }

    @Override
    void getSalary() {
        System.out.println("销售人员的基本工资:" + salary);
    }

    public void setBonus(int bonus) {
        this.bonus = bonus;
    }

    public void getBonus() {
        System.out.println("销售人员的提成:" + bonus);
    }

    @Override
    void computeSalary() {
        System.out.println("销售人员的总工资:" + (salary + bonus));
    }
}
